package asabranca.shell;

import java.io.InputStream;

import org.mentacontainer.Container;
import org.mentacontainer.impl.MentaContainer;

import softbuilder.mentacontainer.impl.XMLConfiguration;

public class AsaBranca {

	private Container container;
	
	private AsaBranca() {
		//Configura container ioc
		container = new MentaContainer();
		InputStream input = getClass().getResourceAsStream("asabranca.shell.resources.ioc");
		try {
			new XMLConfiguration(input).configure(container);
		} catch (Exception e) {			
			e.printStackTrace();
		}
	}

	public Container getContainer() {
		return container;
	}
	
	private static AsaBranca instance;
	public static AsaBranca getInstance() {
		if (instance == null) {
			instance = new AsaBranca();
		}
		return instance;
	}
}
